<?php
/**
 * Created by PhpStorm.
 * User: wangjie
 * Date: 2018/11/19
 * Time: 13:58
 */
namespace common\models\history;

use Yii;
use common\models\BaseModels;
use yii\behaviors\TimestampBehavior;

/**
 * Class CityCode
 * @package common\models\city
 */
class History extends BaseModels
{
    /**
     * @return string
     */
    public static function tableName()
    {
        return '{{history}}';
    }

    /**
     * 给数据库的处理进行时间的操作
     * @return array
     */
    public function behaviors() {
        return [
            TimestampBehavior::className(),
        ];
    }

    /**
     * @return array
     */
    public function rules()
    {
        return [
            [[  'id',
                'status',
                'h_id',
                'title',
                'pic',
                'year',
                'month',
                'day',
                'date',
                'des',
                'lunar',
                'created_at',
                'updated_at',
            ], 'safe'],
        ];
    }
}